﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="/static/css/common/reset.css" />
    <link rel="stylesheet" href="/static/css/login.css" />
    <link rel="stylesheet" href="/static/css/sweetalert.min.css" />
    <title>登录</title>
</head>
<body>
    <div class="login">
        <section class="header">
            <div class="container">
                <div class="clearfix">
                    <div class="logo fl"><img src="/static/images/logo.png" alt=""></div>
                    <div class="type fl">
                        <h2>社团</h2>
                    </div>
                    <!-- <div class="city fl"><span>广州</span><a href="javascript:void(0)">[切换城市]</a></div> -->
                    <div class="search fr">
                        <a href="javascript:void(0);" class="search-edit"></a>
                    </div>
                </div>
            </div>
        </section>
        <section class="login-content clearfix">
            <div class="loginPart fr">
                <span class="loginPart-title">社团账号登录</span>
                <div class="log-content">
                    <form id="formValidate">
                        <input type="text" id="UserName" class="log-f-mail" placeholder="邮箱账号(含手机号码）" />
                        <input type="password" id="Password" class="log-f-pwd mt10" placeholder="6-16位密码，区分大小写" />
                        <!--<div class="mt10 clearfix">
                            <p class="c-c-l fl">
                                <input type="checkbox" name="cancel" id="choose1">
                                <label for="choose1"></label>
                            </p>
                            <p class="c-c-text fl">自动登录</p>
                        </div>-->
                        <input type="button" class="loginBtn mt20" onclick="Login();" value="登 录" />
                    </form>
                    <p class="log-bottom mt10 clearfix">
                        <a href="javascript:void(0)" class="fl">忘记密码？</a>
                        <a href="/personal/register.html" class="fr">免费注册申请</a>
                    </p>
                    <p class="mt10 colorRed">点击进入企业账号登录</p>
                </div>
            </div>
        </section>
    </div>
    <div id="divFooter"></div>
</body>
</html>
<script type="text/javascript" src="/static/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/js/sha512.js"></script>
<script src="/static/js/sweetalert.min.js"></script>
<script>
    $("#divFooter").load("/wuc/footer.html");

    function Login() {
        //if (!common.validateForm())
        //    return;

        var values = common.GetCtrlValues({
            ContentID: "formValidate"
        })

        common.commonAjax({ type: 'Post', url: '../api/user/post', data: values, sMethod: AfterLoginCompleted });
    }

    function AfterLoginCompleted(ctx) {
        if (ctx == null) {
            common.alertMessage("无数据.");
            return;
        }

        common.PutStorageSession("user", ctx.ResponseObj);

        window.location = "associate.html";
    }

</script>
